﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CodeAuto.DALS
{
    public class ProductDAL
    {
        public static string GetProductString(int productId, string projectName)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.AppendLine("Microsoft Visual Studio Solution File, Format Version 11.00");
            sb.AppendLine("# Visual Studio 2010");
            sb.AppendLine("Project(\"{FAE04EC0-301F-11D3-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}\") = \"" + projectName + ".Models\", \"" + projectName + ".Models\\" + projectName + ".Models.csproj\", \"{B353B858-7123-4C98-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}\"");
            sb.AppendLine("EndProject");
            sb.AppendLine("Project(\"{FAE04EC0-301F-11D3-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}\") = \"" + projectName + ".Interfaces\", \"" + projectName + ".Interfaces\\" + projectName + ".Interfaces.csproj\", \"{B353B858-7123-4C98-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}\"");
            sb.AppendLine("EndProject");
            sb.AppendLine("Project(\"{FAE04EC0-301F-11D3-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}\") = \"" + projectName + ".Impls\", \"" + projectName + ".Impls\\" + projectName + ".Impls.csproj\", \"{B353B858-7123-4C98-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}\"");
            sb.AppendLine("EndProject");
            sb.AppendLine("Global");
            sb.AppendLine("     GlobalSection(SolutionConfigurationPlatforms) = preSolution");
            sb.AppendLine("         Debug|Any CPU = Debug|Any CPU");
            sb.AppendLine("         Release|Any CPU = Release|Any CPU");
            sb.AppendLine("     EndGlobalSection");
            sb.AppendLine("     GlobalSection(ProjectConfigurationPlatforms) = postSolution");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}.Debug|Any CPU.ActiveCfg = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}.Debug|Any CPU.Build.0 = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}.Release|Any CPU.ActiveCfg = Release|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 1, 4) + "-" + CsprojDALS.GetPartString(productId, 1, 12) + "}.Release|Any CPU.Build.0 = Release|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}.Debug|Any CPU.ActiveCfg = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}.Debug|Any CPU.Build.0 = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}.Release|Any CPU.ActiveCfg = Release|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 2, 4) + "-" + CsprojDALS.GetPartString(productId, 2, 12) + "}.Release|Any CPU.Build.0 = Release|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}.Debug|Any CPU.ActiveCfg = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}.Debug|Any CPU.Build.0 = Debug|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}.Release|Any CPU.ActiveCfg = Release|Any CPU");
            sb.AppendLine("         {E59CE3F8-B6EA-46AC-" + CsprojDALS.GetPartString(productId, 3, 4) + "-" + CsprojDALS.GetPartString(productId, 3, 12) + "}.Release|Any CPU.Build.0 = Release|Any CPU");
            sb.AppendLine("     EndGlobalSection");
            sb.AppendLine("     GlobalSection(SolutionProperties) = preSolution");
            sb.AppendLine("         HideSolutionNode = FALSE");
            sb.AppendLine("     EndGlobalSection");
            sb.AppendLine("EndGlobal");
            return sb.ToString();
        }
    }
}